1. Field of the Invention
This invention relates to serial communications applied to process automations, etc. Particularly, this invention relates to a retry communication in case of an error. This invention also relates to a reduction in response time.
2. Description of the Related Art
In the process automations, a serial transmission bus is used as an interface for connecting a field apparatus and a monitor controller.
FIG. 1 shows a configuration chart of a general serial communication system. In FIG. 1, a primary station 11, secondary stations 12–15, and a serial transmission bus 16 for connecting each of the stations are illustrated. For example, the secondary stations 12 and 15 are in an input type, and the secondary stations 13 and 14 are in an output type.
According to the related art, a sequential polling system for collecting data of a secondary station by polling and collecting data of another secondary station also by polling is generally applied to a system in which the primary station and a plurality of secondary stations are connected through a serial communication bus. HDLC (High-Level Data Link Control) is an example of the serial polling system. A chart for explaining communication timing of the HDLC is illustrated in FIG. 22, and a configuration chart of a frame defined in the HDLC (JIS-X5104-1991) is illustrated in FIG. 23. A block configuration chart of the primary station is illustrated in FIG. 24. In FIG. 22, a refresh request 1201 from the primary station to the secondary station 13, a refresh response 1202 from the secondary station 13, a refresh request 1203 from the primary station to the secondary station 14, a refresh response 1204 from the secondary station 14, a polling request 1205 from the primary station to the secondary station 12, a polling response 1206 from the secondary station 12, a polling request 1207 from the primary station to the secondary station 15, a polling response 1208 from the secondary station 15, and off time 1209 and 1210 between a request and a response are illustrated.
In FIG. 23, a respective frame 1300 of a request from the primary station and a response from the secondary station, a flag 1301 for indicating a start of the frame, an address 1302 for indicating a destination of transmission, a control 1303 for indicating a frame control, transmission data 1304, a frame check sequence (FCS) 1305 for checking the correctness of the frame, and a flag 1306 for indicating an end of the frame are illustrated.
In FIG. 24, a communication circuit 1401, a processor 1402, a memory 1403, an instruction 1404 for starting a communication, and an interrupt signal 1405 are also illustrated.
Operations are explained.
The processor 1402 in the primary station 11 prepares the frame 1300 for transmitting the refresh request 1201 and the polling request 1205, and instructs the communication circuit 1401 to start a communication (1404). Then, the communication circuit 1401 performs the communication as illustrated in FIG. 25, based on a configuration of transmitting data. When the communication is ended, the communication circuit 1401 notifies the processor 1402 by sending the interrupt signal 1405.
However, according to the serial polling system, when a number of the secondary stations increases, longer time is required for collecting data of all the secondary stations. For solving such problems, a following system for collecting data is proposed in a public gazette.
As a second related art, a following system is disclosed in Japanese Unexamined Published Patent Application Hei 1-300643. Hei 1-300643 discloses a polling-selecting system. A primary station sends a polling signal including transmission order information to a plurality of secondary stations, and the secondary stations monitor a carrier signal in a data transmission line. When the signal from the primary station is off, the secondary stations transmit data in a pre-stored transmission order.
As a third related art, Japanese Unexamined Published Patent Application Hei 9-181752 discloses a following system. In Hei 9-181752, a primary station sends a polling packet including a transmission order of each of the secondary stations, and each of the secondary stations sends data after waiting for a period based on the transmission order in the polling packet.
FIG. 25 illustrates a request and a response retried in case of an error in a serial data collection system according a polling system of the related art. In FIG. 25, a refresh request 901 includes polling requests 911, 913, etc. from a primary station and responses 912, 914, etc. from a secondary station. A response which is not normal is marked with an x. In FIG. 25, polling requests 913 and 923 and responses 914 and 924 from the secondary station are also illustrated. According to the related art, the HDLC has been often used in the serial transmission bus. The HDLC functions well in normal operations. However, when especially a plurality of errors occurs, the request and the response are retried respectively for the plurality of errors. Hence, an overhead of a communication is large, and it becomes difficult to realize real time characteristics of communications.
FIG. 23 illustrates contents described in JIS-X5104-1991 (a frame configuration of a procedure for controlling a high-level data link). Since a data length sent from a respective secondary station is not restricted, there is a possibility that the data length becomes quite long. Further, when the primary station polls each of the secondary stations in an error and retries transmission, the overhead of the communication becomes large, and it becomes impossible to collect data within a cycle.
Further, there is an restriction in the process automation system. A plurality of primary stations is connected to a central processor via a network, and each of the primary stations is connected to a large number of secondary stations. Therefore, since a time relation of 100 inputs must be controlled clearly in the real time, each of the primary stations performs time stamp processing and sends data to the central processor. The primary stations have to end the communication with all the secondary stations within the cycle for performing the time stamp processing.
A basic configuration is generally known and disclosed in a system of Japanese Unexamined Published Patent Application Hei 4-100411 as a fourth related art, and an apparatus of Japanese Unexamined Published Patent Application Hei 9-307575 also as the fourth related art, etc. However, the consistency between retrying in a plurality of times due to an error and maintaining the real time characteristics is not described.
In a system of Japanese Unexamined Published Patent Application Hei 9 181752, etc., a request retried by simultaneous polling is disclosed. However, only inquiry time from the primary station is shortened, and the real time characteristics are not considered.